package com.bsdk.install.device.lockLora;

import com.alibaba.fastjson2.JSONObject;
import com.bsdk.common.core.domain.AjaxResult;

import java.util.Date;

public interface LockLora {

    /**
     * 数据下发
     *
     * @return AjaxResult
     */
    AjaxResult send(JSONObject jsonObject) throws InterruptedException;

    /**
     * 远程开锁
     *
     * @return AjaxResult
     */
    //AjaxResult openRemote();


    AjaxResult commandPingLock(String devId);

    AjaxResult commandRegistLock(String devId);
    /**
     * &#064;description  获取远程开锁命令
     *
     * @return AjaxResult
     * @author sunjian0225@163.com
     * &#064;time  2024/1/15 16:57
     */
    AjaxResult commandOpenRemote();
    /**
     * 远程关锁
     *
     * @return AjaxResult
     */
    AjaxResult commandCloseRemote();
    AjaxResult commandReset();
    /**
     * &#064;description  获取同步时间命令
     *
     * @return AjaxResult
     * @author sunjian0225@163.com
     * &#064;time  2024/1/15 16:57
     */
    AjaxResult commandSyncTime();

    AjaxResult commandAddUser(boolean admin,String pwType, String pw, Date startTime, Date endTime, int userId);

    AjaxResult commandAddUser(boolean admin,String pwType,String pw, Date startTime, Date endTime, int userId,JSONObject cycle,int times);

    AjaxResult commandActiveOrDisableUser(boolean active, int userId);

    AjaxResult commandEditPasswordById(String pw, int userId);

    AjaxResult commandAddKey(String key);

    AjaxResult commandEditExpireTimeById(Date startTime, Date endTime, int userId);

    AjaxResult commandDeleteUserById(int userId);

    AjaxResult commandGetBriefPassword(Date startTime, Integer duration, String key);

    JSONObject result(JSONObject jsonObject);

}
